// pages/address/address.js
var li=[{
    "index":"0",
    "name":"张三",
    "tel":"13733332222",
    "addre":"长沙市天心区解放路一单元110号",
    "image":"../../images/uncheck.png"
},
   {
    "index":"1",
    "name":"李四",
    "tel":"15172225222",
    "addre":"长沙市岳麓区中南大学校本部五舍11号",
    "image":"../../images/check.png"},];
Page({ 
data:{
  list:li
},
onLoad: function(options) {
    var flag=false;//判断是从哪个页面跳转过来
    flag =options.flag;
    if (flag) {
    	 li.push({
      "index":index++,
    	"name":options.name,
    	"tel":options.tel,
    	"addre":options.addre+options.door,
    	"area":options.area,
      "image":"../../images/uncheck.png",
      "addrevalue":options.addrevalue,
      "areavalue":options.areavalue,
      "door":options.door
    	})
        this.setData({
        	list:li
        })
    };
},
addAddre:function(){
  wx.navigateTo({
    url: '/pages/add/add',
  })
}
})